package com.fengyuncx.tp.ali_plugin_example;
import com.fengyuncx.tp.ali_log.AliLogConfig;
import com.fengyuncx.tp.ali_log.AliLogManager;
import com.fengyuncx.tp.ali_plugin.AliPlugin;

import io.flutter.app.FlutterApplication;

public class MyApplication extends FlutterApplication {
    @Override
    public void onCreate() {
        super.onCreate();
        AliPlugin.init(this, "your appKey", "your appSecret");
        initLog();

    }

    private void initLog() {
        AliLogConfig config = new AliLogConfig();
        config.endpoint = "cn-shenzhen.log.aliyuncs.com";
        config.project = "demo-project";
        config.logStore = "flutter";
        config.AK = "your AK";
        config.SK = "your SK";
        config.context = getApplicationContext();
        config.appName = "Flutter_阿里日志Demo";
        config.apiEnv = "Debug";
        config.terminal = "01";
        AliLogManager.setLogOpen(true);
        AliLogManager.init(config);
    }

}
